package com.ktgj.customer.service.impl;

import java.util.List;
import com.ktgj.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ktgj.customer.mapper.BusinessRefundMapper;
import com.ktgj.customer.domain.BusinessRefund;
import com.ktgj.customer.service.IBusinessRefundService;

/**
 * 退续费订单Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-09-15
 */
@Service
public class BusinessRefundServiceImpl implements IBusinessRefundService 
{
    @Autowired
    private BusinessRefundMapper businessRefundMapper;

    /**
     * 查询退续费订单
     * 
     * @param refundId 退续费订单ID
     * @return 退续费订单
     */
    @Override
    public BusinessRefund selectBusinessRefundById(Long refundId)
    {
        return businessRefundMapper.selectBusinessRefundById(refundId);
    }

    /**
     * 查询退续费订单列表
     * 
     * @param businessRefund 退续费订单
     * @return 退续费订单
     */
    @Override
    public List<BusinessRefund> selectBusinessRefundList(BusinessRefund businessRefund)
    {
        return businessRefundMapper.selectBusinessRefundList(businessRefund);
    }

    /**
     * 新增退续费订单
     * 
     * @param businessRefund 退续费订单
     * @return 结果
     */
    @Override
    public int insertBusinessRefund(BusinessRefund businessRefund)
    {
        businessRefund.setCreateTime(DateUtils.getNowDate());
        return businessRefundMapper.insertBusinessRefund(businessRefund);
    }

    /**
     * 修改退续费订单
     * 
     * @param businessRefund 退续费订单
     * @return 结果
     */
    @Override
    public int updateBusinessRefund(BusinessRefund businessRefund)
    {
        businessRefund.setUpdateTime(DateUtils.getNowDate());
        return businessRefundMapper.updateBusinessRefund(businessRefund);
    }

    /**
     * 批量删除退续费订单
     * 
     * @param refundIds 需要删除的退续费订单ID
     * @return 结果
     */
    @Override
    public int deleteBusinessRefundByIds(Long[] refundIds)
    {
        return businessRefundMapper.deleteBusinessRefundByIds(refundIds);
    }

    /**
     * 删除退续费订单信息
     * 
     * @param refundId 退续费订单ID
     * @return 结果
     */
    @Override
    public int deleteBusinessRefundById(Long refundId)
    {
        return businessRefundMapper.deleteBusinessRefundById(refundId);
    }
}
